{% extends "base_generic.html" %}
{% block content %}
        <h1>Sounds</h1>
        <h2><a href="/admin/sounds//new/" class="add">Añadir sound</a></h2>
        <p><a href="/admin/soundcategories">Categories</a></p>
        <select name="categories" id="categories" style="float:right; margin-top: -50px; display: block">
          {% for cat in categories %}
            <tr>
              <option value="{{ cat.slug }}">{{ cat.name }}</option>
            </tr>
          {% endfor %}
        </select>
        <table class="imgswithoutborders">
        {% for joke in jokes %}
          <tr>
            <td><strong>{{ joke.title }}</strong> <span style="background-color: #8AB800; font-size: 85%; color: white; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; padding: 0 4px">{{ joke.category }}</span> {% if joke.category2 %}<span style="background-color: #8AB800; font-size: 85%; color: white; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; padding: 0 4px">{{ joke.category2 }}</span>{% endif %}
              <br /><span style="color: #aaa">{{ joke.text|truncatewords:18 }}</span>
              </td>
            <td><a href="/jokes/{{ joke.jokeId }}">Public</a></td>
            <td><a href="/admin/jokes/{{ joke.key }}/edit/">Editar</a></td>
            <td><a href="/admin/jokes/{{ joke.key }}/delete/" onclick="if(confirm('¿Do you really want to delete {{ joke.title }}?')){return true;}else{return false;}">Borrar</a></td>
          </tr>
        {% endfor %}
        </table>

{% endblock %}
